import  {post,get,del} from  "../model/http";
import  api from  "../model/api";
import userModel from "./userModel";


const  users = {
    login:(data:userModel)=>post(api.users.login,data),
    list:(params:userModel)=>get(api.users.list,params),
    del:(data:userModel)=>del(api.users.del,data),
    add:(data:userModel)=>post(api.users.add,data)
}

const  login  = users.login;
const userlist  = users.list;
const userdel  = users.del;
const adduser =  users.add;


export  {
    login,
    userlist,
    userdel,
    adduser
}